from django.contrib.auth.mixins import LoginRequiredMixin
from django.views import View
from django.http import JsonResponse
class LoginRequiredJSONMixin(LoginRequiredMixin,View):
    def handle_no_permission(self,request):

        return JsonResponse({'code':400,'errmsg':'用户未登录'})